<?php
namespace app\controller\api;

use app\BaseController;
use app\model\TpTestType;

class Test extends BaseController
{
    public function types()
    {
        $list = TpTestType::field('id, name, desc, total_questions')
                         ->where('status', 1)
                         ->select();
        return json(['code' => 200, 'msg' => 'success', 'data' => $list]);
    }
}